from django.db import models

# Create your models here.
class company(models.Model):
    company_name=models.CharField(max_length=50)
    industry=models.CharField(max_length=50)
    address=models.CharField(max_length=50)
    create_time=models.DateTimeField(auto_now_add=True)
    update_time=models.DateTimeField(auto_now=True)

class customer(models.Model):
    name = models.CharField(max_length=50)
    email = models.CharField(max_length=50)
    phone = models.CharField(max_length=50)
    create_time = models.DateTimeField(auto_now_add=True)
    update_time = models.DateTimeField(auto_now=True)
    company_id = models.ForeignKey(company,on_delete=models.CASCADE,related_name='customer')